<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class PostController extends Controller
{
    //列表
    public function index(){
        $posts=[
            ['title'=>'this is title1'],
            ['title'=>'this is title2'],
            ['title'=>'this is title3'],

        ];
//        return view("post/index",['posts'=>$posts]);
        return view("post/index",compact('posts'));

    }
    public function show(){
        return view('post/show',['title'=>'this is title','isShow'=>false]);


    }
    public function create(){
        return view('post/create');

    }
    public function store(){

    }
    public function edit(){
        return view('post/edit');

    }
    //更新
    public function update(){

    }
    //删除
    public function delete(){

    }


}
